home *** CD-ROM | disk | FTP | other *** search
- Path: jaxnet.jaxnet.com!jax!garyg
- From: garyg@jax.jaxnet.com (Gary M. Greenberg)
- Newsgroups: comp.lang.c
- Subject: Re: File Creation, Read and Write
- Date: 24 Jan 1996 21:09:15 GMT
- Organization: Southeast Network Services, Inc.
- Message-ID: <4e675r$5pp@jaxnet.jaxnet.com>
- References: <310479CB.4EFC@teleport.com>
- NNTP-Posting-Host: jax.jaxnet.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Curious George, geobonn@teleport.com wrote:
- : Hello all:
-
- : Can someone please post or e-mail me the easiest and most efficient
- : funtion in C to use to Create, Write and Read from a file. This file
- : would hold Charater stats for a simple Role Playing Game. Any help would
- : be much appreciated.
-
- : Thanks,
- : George
-
- Look up: fopen(),fgets(),sprintf() or fputs(), and fclose().
- You'll likely need and/or want stdio.h, string.h, stdlib.h
- probably find good use for malloc too.
-
- Of course, at worst, you could always just do it a character at a time.
-
- Seems like you should grab a copy of The C Programming Language, 2nd
- Edition by Kerninghan & Ritchie as well as a copy of the c.l.c faq.
-
- C'ya,
-
- gary /* the Sorcerer's Apprentice */
-
- "Why do we have to hide from the police, Daddy?"
- "Because we use vi, honey. They use emacs."
- "Unless we're on the Mac. Then we use BBEdit 'cause 'It doesn't suck.'"
-